package com.deercrowing.takeaway.entity;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;

/**
 * 菜品表(Dishes)表实体类
 *
 * @author guoyongxiang
 * @since 2024-07-11 10:51:24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tb_dishes")
public class DishesEntity extends Model<DishesEntity> {
    //ID，唯一标识    
    @TableId
    private Integer id;
    //菜品名称    
    @TableField("name")
    private String name;
    //菜品分类id    
    @TableField("category_id")
    private Short categoryId;
    //菜品价格    
    @TableField("price")
    private BigDecimal price;
    //图片URL    
    @TableField("image")
    private String image;
    //0停售、1起售    
    @TableField("status")
    private Short status;
    //菜品描述
    @TableField("description")
    private String description;
    //创建时间    
    @TableField("create_time")
    private LocalDateTime createTime;
    //更新时间    
    @TableField("update_time")
    private LocalDateTime updateTime;
    //创建人    
    @TableField("create_employee")
    private Integer createEmployee;
    //修改人    
    @TableField("update_employee")
    private Integer updateEmployee;

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    public Serializable pkVal() {
        return this.id;
    }
    
}

